<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    //下载导入模板
    $router->get('download/data/import' ,'CommonController@download');

    //主页
    $router->get('/', 'HomeController@index')->name('home');

    //网点区域划分
    $router->get('regional/division', 'HomeController@RegionalDivision')->name('regional/division');

    //网点区域划分
    $router->get('regional/divisions', 'HomeController@RegionalDivisions')->name('regional/divisions');

    //网点区域划分提交
    $router->any('/admin_points', 'HomeController@admin_points')->name('admin_points');

    //网点区域划分删除
    $router->any('/admin_points/del', 'HomeController@admin_points_delete')->name('admin_points/del');

    //图片上传
    $router->post('upload' ,'CommonController@oss_upload');

    //商品管理
    $router->resource('/goods/manage', 'Goods\GoodsController');

    //上货管理
    $router->resource('loading/goods/manage', 'Goods\LoadingController');

    //积分商品管理
    $router->resource('/exchange/goods/manage', 'Goods\ExchangeGoodsController');

    //积分商品分类管理
    $router->resource('/exchange/goods/type/manage', 'Goods\ExchangeGoodsTypeController');

    //商品分类
    $router->resource('/goods/type', 'Goods\TypeController');

    //商品评论
    $router->resource('/goods/content/manage', 'Goods\ContentController');

    //水票管理
    $router->resource('/goods/water_ticket/manage', 'Goods\WaterTicketController');

    //水票记录
    $router->any('/goods/water_ticket/by/record', 'Goods\WaterTicketController@by_record');

    //用户管理
    $router->resource('/member/user/manage', 'Member\UserController');

    //轮播图管理
    $router->resource('/system/banner/manage', 'System\BannerController');

    //公告管理
    $router->resource('/system/notice/manage', 'System\NoticeController');

    //用户详情
    $router->any('/member/user/detail', 'Member\UserController@detail');

    //水票明细
    $router->any('/member/user/water/ticket/record', 'Member\UserController@water_ticket_record');

    //新人大礼包
    $router->resource('/coupon/package/manage', 'Coupon\PackageController');

    //优惠券管理
    $router->resource('/coupon/coupon/manage', 'Coupon\CouponController');

    //发送优惠券
    $router->resource('/coupon/distribution/manage', 'Coupon\DistributionController');

    //优惠券管理
    $router->resource('/coupon/used/manage', 'Coupon\UseCouponController');

    //商户管理
    $router->resource('/merchant/merchant/manage', 'Merchant\MerchantController');

    //月度统计
    $router->resource('/merchant/statistics/manage', 'Merchant\StatisticsController');

    //还桶管理
    $router->resource('/order/return/bucket', 'Order\ReturnBucketController');

    //订单管理
    $router->resource('/order/order/manage', 'Order\OrderController');

     //上货
    $router->resource('/network/loading/order', 'Order\LoadingOrderController');

    //积分订单管理
    $router->resource('/points/order/manage', 'Order\PointsOrderController');

    //提现管理
    $router->resource('/member/user/withdrawal', 'Member\UserWithdrawalController');

    //活动管理
    $router->resource('/activity/manage', 'Activity\ActivityController');

    //短链接管理
    $router->resource('/short/link/manage', 'Activity\ShortLinkController');

    //易换管理
    $router->resource('/exchangeable/manage', 'Exchangeable\ExchangeableController');

    //信息配置
    $router->resource('/system/information/manage', 'System\InformationController');

    //积分规则
    $router->resource('/system/Integral/rule', 'System\IntegralController');

    //上楼费设置
    $router->resource('/system/goupstairs/setting', 'System\GoupstairsController');

    //意见反馈
    $router->resource('/system/feedback/manage', 'System\FeedbackController');

    //员工
    $router->resource('/system/staff/manage', 'System\StaffController');

    //优惠券管理
    $router->resource('/sms/manage', 'System\SmsController');

    //商品上架审核
    $router->resource('/goods/review', 'Goods\ReviewController');

    //商品下架原因
    $router->resource('/goods/reason', 'Goods\ReasonController');

    //商品库
    $router->resource('/warehouse/goods/manage', 'Goods\WarehouseGoodsController');

    /*************************************************商家端****************************************************/
    //选品入库
    $router->resource('/network/goods/options', 'Network\GoodsController');

    //我的商品
    $router->resource('/network/my/goods', 'Network\MyGoodsController');

    //订单管理
    $router->resource('/network/order/manage', 'Network\OrderController');

    //商家统计
    $router->resource('/network/statistics/manage', 'Network\StatisticsController');

    $router->any('/charts/one', 'Charts\FinanceController@page');

    $router->any('/charts/two', 'Charts\ProjectController@page');

    $router->any('/charts/three', 'Charts\SupplierController@page');

    $router->any('/charts/four', 'Charts\WarehouseController@page');

});
